﻿define(function (require) {
    require('model/Feed');

    window.FeedList = Backbone.Collection.extend({
        model: Feed,
        comparator: function (e) {
            if (e.get('Type') == "notification")
                return -e.get('UpdateOn') * 2; // notification永远排在前面
            else if (e.get('Type') == "update")
                return -e.get('UpdateOn');
            else
                return 2;
        },
        reset: function (e) {
            this._reset();
            if (e) {
                this.add(e);
            }
        }
    });
});